﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Finance/FinanceMaster.master" AutoEventWireup="true" 
	CodeBehind="CommTemplates.aspx.cs" Inherits="WebApplication.Finance.CommTemplates" Theme="BaselineTheme" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register src="../Controls/PageHeadingBarCtrl.ascx" tagname="PageHeadingBarCtrl" tagprefix="uc1" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.listStyle
{
	margin:auto;
	width:746px;
}
</style>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PreBodyContent" runat="server">
<script language="javascript" type="text/javascript">
function confirmDeleteTemplate()
{
	return confirm('Delete the selected template?');
}
</script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<!-- Heading bar -->
<div style="margin:auto; margin-top:0px; width:810px;">
	<uc1:PageHeadingBarCtrl ID="pageHeadingBarCtrl" runat="server" Title="Templates" />
</div>

<!-- Templates Grid -->
<asp:Panel runat="server" ID="pnlList" CssClass="listStyle">
<div style="overflow:auto; height:600px;">
	<asp:GridView ID="gridTemplates" runat="server" AutoGenerateColumns="False" DataKeyNames="CommTemplateId" GridLines="None"
		Width="720px" ShowHeader="false" onrowdatabound="gridTemplates_RowDataBound" HorizontalAlign="Center"  >
		<Columns>
			<asp:TemplateField>
				<ItemTemplate>
					<table border="0" cellpadding="0" cellspacing="0">
						<tr style="height:28px;">
							<td width="24px"><asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImagePath") %>' /></td>
							<td width="428px"><span style="font-family: Arial, Helvetica, sans-serif; font-size:10pt; font-weight:bold;"><asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Name") %>' /></span></td>
							<td width="90px" rowspan="2"><span style="font-family: Arial, Helvetica, sans-serif; font-size:8pt;"><asp:Literal ID="Literal2" runat="server" Text='<%# Eval("LastModified") %>' /></span></td>
							<td width="170px" rowspan="2"><asp:DropDownList ID="cboAction" runat="server" OnSelectedIndexChanged="cboAction_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>&nbsp;
								<asp:Button ID="butDelete" runat="server" Text="Delete..." OnClick="butDelete_Click" />
							</td>
						</tr>
						<tr>
							<td></td>
							<td><span style="font-style:italic; font-size:9pt;"><asp:Literal ID="Literal3" runat="server" Text='<%# Eval("SummaryLine") %>' /></span></td>
						</tr>
					</table>
				</ItemTemplate>
			</asp:TemplateField>
		</Columns>
		<RowStyle Font-Size="12pt" Font-Bold="False" Font-Names="Arial" CssClass="UnderlineBorder" VerticalAlign="Top" />
	</asp:GridView>
</div>
</asp:Panel>

<!-- Options -->
<asp:Panel runat="server" ID="pnlOptions" CssClass="sectionPanel">
<table width="100%" style="height:40px;">
	<tr>
		<td style="width:10px;" />
		<td>
			<asp:LinkButton ID="hypNewEmail" runat="server" OnClick="hypNewEmail_Click" CssClass="WhiteHyperLinkInSection">New Email Template</asp:LinkButton> | 
			<asp:LinkButton ID="hypNewOffice" runat="server" OnClick="hypNewOffice_Click" CssClass="WhiteHyperLinkInSection">New Letter Template</asp:LinkButton>		
		</td>
		<td style="text-align:right;" >
			<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Finance/CommBodies.aspx" CssClass="WhiteHyperLinkInSection">Communication Bodies</asp:HyperLink>
		</td>
		<td style="width:10px;" />
	</tr>
</table>
</asp:Panel>

</asp:Content>
